//
//  WCDom.h
//  WebExtractSimpleViewer
//
//  Created by Daniel Braun on 10/03/07.
//  Copyright 2007 Daniel Braun http://page-appart.net, http://braun.daniel.free.fr All rights reserved.
//

#import <Cocoa/Cocoa.h>

#include "WCconfig.h"

#ifdef NODOM

#define DOMNode NSXMLNode
#define DOMHTMLElement NSXMLElement
#define DOMText NSXMLNode
#define DOMNodeList NSArray

@interface NSArray (DomCompatibility)
- (id) item:(int)idx;
@end
@interface NSXMLElement (DomCompatibility)

- (NSString *) idName;
- (NSString *) className;
- (NSString *) tagName;
- (NSString *) innerText;
- (NSString *) outerHTML;
- (NSString *) getAttribute:(NSString *)n;
- (DOMNodeList *)getElementsByTagName:(NSString *)name;

@end

@interface  NSXMLNode (DomCompatibility)
- (NSString *) nodeName;
- (NSString *) nodeValue;
- (NSXMLNode *) parentNode;
- (NSXMLNode *) firstChild;
- (BOOL) hasChildNodes;
@end
#else
#import <WebKit/DOM.h>

@class DOMNode;
@class DOMHTMLElement;
#endif